<?php

/**
 * WaveType filter form base class.
 *
 * @package    TMD
 * @subpackage filter
 * @author     Thaihosting
 */
abstract class BaseWaveTypeFormFilter extends BaseFormFilterPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'SDESC_TH'   => new sfWidgetFormFilterInput(),
      'SDESC_ENG'  => new sfWidgetFormFilterInput(),
    ));

    $this->setValidators(array(
      'SDESC_TH'   => new sfValidatorPass(array('required' => false)),
      'SDESC_ENG'  => new sfValidatorPass(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('wave_type_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'WaveType';
  }

  public function getFields()
  {
    return array(
      'IWAVE_TYPE' => 'Number',
      'SDESC_TH'   => 'Text',
      'SDESC_ENG'  => 'Text',
    );
  }
}
